package study.alex.resumedb.gae.feeds;

import study.alex.resumedb.gae.model.Vacancy;
import java.util.Collection;

/**
 * Created with IntelliJ IDEA.
 * User: alex
 * Date: 13.02.14
 * Time: 10:20
 * SVN $Id$
 */
public interface VacancyFeed {

    /**
     * Get Id of VacancyFeed instance
     * @return Id
     */
    public String getId();

    /**
     * Get Description about service
     * @return Short Description about service
     */

    public String getDescription();

    /**
     * Get Service's Web site URL
     * @return URL
     */
    public String getWeb();

    /**
     * Get current search keywords
     * @return Keywords
     */

    public String getKeywords();

    /**
     * Set keywords for search.  Keywords is comma separated list of keyword or search request if feed service support it.
     * @param keywords
     */
    public void setKeywords(String keywords);

    /**
     * Set mode, when keywords will interpret as search request for feed service according to
     * query language of service (complexMode=true).  If complexMode=false keywords will interpret
     * as comma separated list of plan keywords.
     * @param complexMode
     */
    public void setComplexMode(boolean complexMode);

    /**
     * Check complexMode is ON
     * @return ComplexMode status
     */

    public boolean isComplexMode();

    /**
     * Check feed service support complex mode
     * @return ComplexMode support status
     */

    public boolean isComplexModeSupport();

    /**
     * Set pagination mode
     * @param limitPage - quantity of vacancies into one page
     */

    public void setPagination(int limitPage);

    /**
     * Clear pagination mode
     */

    public void clearPagination();

    /**
     * Get list of vacancies relevant setting keywords
     * @return Collection of vacancies or null, if relevant vacancies not found.  If pagination mode is set,
     * return next page of vacancies, or null if no mode vacancies found.
     */

    public Collection<Vacancy> getVacancies();

    /**
     * Start new search, move to first page of result
     */
    public void newSearch();
}
